/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.playground.core.service;

import com.playground.core.entity.GameTitle;
import com.playground.core.entity.Room;
import java.util.Iterator;

/**
 *
 * @author Tiago Peres
 */
public interface RoomService {
    /**
     * Returns an iterator with references to all rooms with their status equal
     * to "full".
     * 
     * Notice that the list of full rooms is constantly changing, calls to
     * this method should be done frequently to mantain an updated record of
     * full rooms.
     * 
     * @return an iterator for list of full rooms
     */
    @Deprecated
    Iterator<Room> getFullRoomsIterator();
    
    /**
     * Returns an iterator with references to all rooms with their status equal
     * to "ready".
     * 
     * Notice that the list of ready rooms is constantly changing, calls to
     * this method should be done frequently to mantain an updated record of
     * ready rooms.
     * 
     * @return an iterator for list of ready rooms
     */
    @Deprecated
    Iterator<Room> getReadyRoomsIterator();
    
    /**
     * Returns an iterator with references to all rooms with their status equal
     * to "refused".
     * 
     * Notice that the list of refused rooms is constantly changing, calls to
     * this method should be done frequently to mantain an updated record of
     * refused rooms.
     * 
     * @return an iterator for list of refused rooms
     */
    @Deprecated
    Iterator<Room> getRefusedRoomsIterator();
    
    /**
     * Closes a room if it exists.
     * 
     * @param room the room to be closed
     * @return true if the room was successfully closed, false if the room was
     * not found
     */
    boolean closeRoom(Room room);
    
    /**
     * Set up a new room for the given GameTitle.
     * 
     * @param gameTitle the gameTitle for the room to be set up
     * @return the new room
     */
    Room setUpNewRoom(GameTitle gameTitle);
}
